#ifndef BORROWERBOOKWIDGET_H
#define BORROWERBOOKWIDGET_H

#include <QWidget>
#include<QFile>
#include<QTextStream>
#include<QDebug>
#include"book.h"
#include <vector>
#include<QTextCodec>
#include<QCheckBox>
#include<QMessageBox>
#include<QDateTime>
#include<QCompleter>

namespace Ui {
class borrowerBookwidget;
}

class borrowerBookwidget : public QWidget
{
    Q_OBJECT

public:
    explicit borrowerBookwidget(QWidget *parent = nullptr);
    //定义事件过滤器
    bool eventFilter(QObject *watched, QEvent *event) override;
    ~borrowerBookwidget();
    void init();
    void showallbook();
    void Currentbooks();//展示前一个显示的表格

private slots:
    void on_lineEdit_editingFinished();

    void on_comboBox_currentIndexChanged(int index);

    void on_radioButton_clicked(bool checked);

    void on_borrow_button_clicked();

    void on_cancelallbutton_clicked();

private:
    Ui::borrowerBookwidget *ui;
     std::vector<Book> books;  // 创建一个vector容器来存放Book类对象
     std::vector<Book> currentbooks; //保存当前页面储存的表格图书

};

#endif // BORROWERBOOKWIDGET_H
